Optimal. Leaf size=49 \[ -\frac{a^2 \sin ^3(e+f x)}{3 f}+\frac{a (a+2 b) \sin (e+f x)}{f}+\frac{b^2 \tanh ^{-1}(\sin (e+f x))}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0608709, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {4147, 390, 206} \[ -\frac{a^2 \sin ^3(e+f x)}{3 f}+\frac{a (a+2 b) \sin (e+f x)}{f}+\frac{b^2 \tanh ^{-1}(\sin (e+f x))}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4147
Rule 390
Rule 206
Rubi steps
\begin{align*} \int \cos ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (a+b-a x^2\right )^2}{1-x^2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left (a (a+2 b)-a^2 x^2+\frac{b^2}{1-x^2}\right ) \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{a (a+2 b) \sin (e+f x)}{f}-\frac{a^2 \sin ^3(e+f x)}{3 f}+\frac{b^2 \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{b^2 \tanh ^{-1}(\sin (e+f x))}{f}+\frac{a (a+2 b) \sin (e+f x)}{f}-\frac{a^2 \sin ^3(e+f x)}{3 f}\\ \end{align*}
Mathematica [A] time = 0.0250815, size = 72, normalized size = 1.47 \[ -\frac{a^2 \sin ^3(e+f x)}{3 f}+\frac{a^2 \sin (e+f x)}{f}+\frac{2 a b \sin (e) \cos (f x)}{f}+\frac{2 a b \cos (e) \sin (f x)}{f}+\frac{b^2 \tanh ^{-1}(\sin (e+f x))}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.059, size = 72, normalized size = 1.5 \begin{align*}{\frac{ \left ( \cos \left ( fx+e \right ) \right ) ^{2}\sin \left ( fx+e \right ){a}^{2}}{3\,f}}+{\frac{2\,{a}^{2}\sin \left ( fx+e \right ) }{3\,f}}+2\,{\frac{ab\sin \left ( fx+e \right ) }{f}}+{\frac{{b}^{2}\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.986582, size = 85, normalized size = 1.73 \begin{align*} -\frac{2 \, a^{2} \sin \left (f x + e\right )^{3} - 3 \, b^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, b^{2} \log \left (\sin \left (f x + e\right ) - 1\right ) - 6 \,{\left (a^{2} + 2 \, a b\right )} \sin \left (f x + e\right )}{6 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.512509, size = 165, normalized size = 3.37 \begin{align*} \frac{3 \, b^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \, b^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \,{\left (a^{2} \cos \left (f x + e\right )^{2} + 2 \, a^{2} + 6 \, a b\right )} \sin \left (f x + e\right )}{6 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.27523, size = 101, normalized size = 2.06 \begin{align*} -\frac{2 \, a^{2} \sin \left (f x + e\right )^{3} - 3 \, b^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, b^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 6 \, a^{2} \sin \left (f x + e\right ) - 12 \, a b \sin \left (f x + e\right )}{6 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]